<!DOCTYPE html>
<html lang="en">
	<head>
	    <title>平账</title>
	    <meta charset="UTF-8" />
	    <meta name="Author" content="" />
	    <meta name="Keywords" content="" />
	    <meta name="Description" content="" />
	    
	    <!-- 样式库 -->
	    <link rel="stylesheet" href="../../../js/ztree/css/zTreeStyle/zTreeStyle.css" />
	    <link rel="stylesheet" href="../../../js/bootstrap/themes/default/bootstrap.css" />
	    <link rel="stylesheet" href="../../../js/jquery-easyui-1.5/themes/bootstrap/validatebox.css" />
	    <link rel="stylesheet" href="../../../js/jquery-easyui-1.5/themes/bootstrap/tooltip.css" />
	    <link rel="stylesheet" href="../../../css/jquery.select2.css" />
	    <link rel="stylesheet" href="../../../css/jquery.select2-bootstrap.css" />
	    <link rel="stylesheet" href="../../../css/jquery.datetimepicker.css" /> 
	    
	    
	    <!-- 插件库 -->
	    <script src="../../../js/common/package.js"></script>
		<script src="../../../js/common/url.js"></script>
		<script src="../../../js/common/json2.js"></script>	
		<script src="../../../js/common/jquery-1.11.3.min.js"></script>		
		<script src="../../../js/bootstrap/bootstrap.js"></script>
		<script src="../../../js/bootstrap/plugins/bootstrap-paginator.js"></script>
		<script src="../../../js/jquery-easyui-1.5/jquery.easyui.min.js"></script>
		<script src="../../../js/ztree/js/jquery.ztree.all.min.js"></script>
		<script src="../../../js/common/jquery.select2.js"></script>
		<script src="../../../js/common/jquery.datetimepicker.js"></script>
		
		<!-- 业务库 -->
		<script src="../../../js/common/base.js"></script>
		<script src="../../../js/common/datagrid2.js"></script>
		<script src="../../../js/common/tree.js"></script>
		<script src="../../../js/common/formatter.js"></script>	    
	    <script src="../../../js/each/cfm/cfmSys/accountBalanced.js"></script>
	    <script src="../../../js/each/cfm/merch/merch.js"></script>
		
		<!-- 页面样式 -->
		<style type="text/css">
			body {
				font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif !important;
				background:#eee url("../../../img/back.png") repeat;
			}
			.container-fluid {
				padding:5px;
			}
			.left-part {
				height:800px;
			}
			.modal-form {
				margin:8px;
			}
		</style>
	    
	</head>   
	<body>
	
		<div class="container-fluid">
			<div class="row">				
				<div class="col-md-12">
					<div class="panel panel-info">
						<div class="panel-heading">
							<h4 class="panel-title">查询信息</h4>
					  	</div>
					  	<div class="panel-body">	
					  		<form id="searchForm" class="form-inline">
							  	<div class="form-group">
							    	<label class="form-label">商户名 </label>
							  	</div>
							  	<div class="form-group">
								    <input id="merchCode" type="text" readonly value="全部商户" name="merchCode" class="form-control merch" onclick="showMenu(); return false;" style="width:220px;"/>
							  	</div>
							  	<div class="form-group">
							    	<label class="form-label">最迟还款日</label>
							  	</div>
							  	<div class="form-group">
							    	<input name="startDate" id='startDate' type="text" class="form-control input-sm" placeholder="请输入开始时间">
							  	</div>
							  	<div class="form-group">
							    	<label class="form-label">至</label>
							  	</div>
							  	<div class="form-group">
							    	<input name="endDate" id='endDate' type="text" class="form-control input-sm" placeholder="请输入结束时间">
							  	</div>
							  	<div class="form-group">
							    	<label class="form-label">手机号</label>
							  	</div>
							  	<div class="form-group">
							    	<input id="regId" name="regId" type="text" class="form-control input-sm" placeholder="请输入手机号">
							  	</div>
							  	<div class="form-group">
							    	<label class="form-label">账单状态</label>
							  	</div>
							  	<div class="form-group">
							    	<select id="status" name="status" class="form-control">
							    	   <option value=''>请选择还款状态</option>
							    	   <option value='1'>未还款</option>
							    	   <option value='2'>已逾期</option>
							    	   <option value='3'>已还款</option>
								    </select>
							  	</div>
							  	<button id="btn-search" type="button" class="btn btn-default btn-sm">查询</button>
								<button id="btn-reset" type="button" class="btn btn-default btn-sm">重置</button>	
								<button id="btn-accountBalanced" type="button" class="btn btn-default btn-sm">平账</button>					
							</form>		  												 	
					  	</div>
					</div>
					<div class="panel panel-info">
						<div class="panel-heading">
							<h4 class="panel-title">订单列表</h4>
					  	</div>
						<table id='datagrid' class="table table-striped table-bordered table-hover table-condensed">
						    <thead>
						    	<tr>
						    	    <th field="ck" formatter="Formatter.checkbox(val,row,rowIndex)"></th>
						    	    <th field="rn">序号</th>	
						    	    <th field="orderId" width='100px'>订单号</th>						    		
							    	<th field="regId">手机号</th>		
							    	<th field="realName">借款人</th>	
							    	<th field="merchName">商户</th>	
							    	<th field="repayNo">期数</th>
							    	<th field="installTerms">总期数</th>	
							    	<th field="lastRepayDate" formatter="Formatter.timeCfm2(val)">最迟还款日</th>
							    	<th field="overdueDays">逾期天数</th>
							    	<th field="curRepayAmt" formatter="Formatter.money(val)">本期应还</th>	
							    	<th field="curRepayOverdueInterest" formatter="Formatter.money(val)">罚息</th>
							    	<th field="curRealRepayamt" formatter="Formatter.money(val)">还款金额</th>
							    	<th field="curRepayDate" formatter="Formatter.timeCfm2(val)">还款日期</th>
							    	<th field="status" formatter="Formatter.status(val)">还款状态</th>
						    	</tr>
						    </thead>
						    <tbody></tbody>
						</table>
					  	<div class="panel-footer">
							<div id="paginator"></div>
						</div>
					</div>
				</div>
			</div>		 	
		</div>
		<div id="open-win" class="modal fade" role="dialog" aria-labelledby="update-win-label" aria-describedby="……">
			<div class="modal-dialog" role="document">
		    	<div class="modal-content">
		      		<div class="modal-header">
		        		<h5 class="modal-title" id="update-win-label"></h5>
		      		</div>
	      			<div class="modal-form">
	      				<form id="updateForm" class="form-horizontal">
				  			<input name="orderId" id='orderId' type="hidden" class="form-control input-sm">
				  			<div class="form-group">
				    			<label class="col-sm-3 control-label">还款日期</label>
				    			<div class="col-sm-9">
				    			    <input name="repayDate" id='repayDate' type="text" class="form-control input-sm easyui-validatebox" required="required" placeholder="请输入还款日期">
				    			</div>
				  			</div>
				  			<div class="form-group">
				    			<label class="col-sm-3 control-label">还款金额</label>
				    			<div class="col-sm-9">
				    			    <input name="curRepayAmt" id='curRepayAmt' type="text" class="form-control input-sm" readonly/>
				    			</div>
				  			</div>
				  			<div class="form-group">
				    			<label class="col-sm-3 control-label">资金流水号</label>
				    			<div class="col-sm-9">
				    			    <input name="tradeNo" id='tradeNo' type="text" class="form-control input-sm easyui-validatebox" required="required"/>
				    			</div>
				  			</div>
				  			<div class="form-group">
				    			<label class="col-sm-3 control-label">平账原因</label>
				    			<div class="col-sm-9">
				    			    <input name="reason" id='reason' type="text" class="form-control input-sm easyui-validatebox" required="required"/>
				    			</div>
				  			</div>
						</form>
	      			</div>		      		
		      		<div class="modal-footer">
				        <button id="btn-save" type="button" class="btn btn-success btn-sm">确定</button>
				        <button id="btn-close" type="button" class="btn btn-default btn-sm">取消</button>		        
		      		</div>
		    	</div>
		  	</div>
		</div>
		<div id="menuContent" class="menuContent" style="max-height:500px;overflow:scroll;display:none; position: absolute;background:#fff;border:1px solid #ccc;">
	        <ul id="treeDemo" class="ztree" style="margin-top:0; width:160px;"></ul>
        </div>
	</body>
</html>